Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 5 - Objects and References / References


Containers

A container is an object that contains one or more objects or properties. In a reference, the container specifies where to find an object or a property. To specify a container, use the word of or in, as in

word 5 of paragraph 10
and

character 2 in word 12
where word 5 is contained in a paragraph object and character 2 is contained in a word object.

A container can be an object or a series of objects. In a series, list the smallest object first, followed by the larger objects that contain it. Use the word of or in to separate each object from its larger, containing object. For example, in

word 5 of paragraph 10 of document "Report"
word 5 is contained by the larger object, paragraph 10; paragraph 10 is contained by the larger object document "Report".

You can also use the possessive form ('s) to specify containers. If you use the possessive form, list the container before the object it contains. For example, in

first window's name
the container is first window. The object it contains is a Name property.

All properties and elements have containers. The previous example
specified the Name property of a window, which is contained in a window object. Similarly, the following example specifies the Style property, which
is contained in a character object.

style of first character

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996